package com.tg.service.eventbus2.component;

import com.google.common.collect.Lists;
import com.tg.service.eventbus2.Component;
import com.tg.service.eventbus2.entity.Event;
import com.tg.service.eventbus2.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

public class FirstLoginCp extends Component {

    private static final Logger LOGGER = LoggerFactory.getLogger(FirstLoginCp.class);

    public FirstLoginCp() {
    }

    public FirstLoginCp(UserService userService) {
        this.userService = userService;
    }

    private UserService userService;

    public UserService getUserService() {
        return userService;
    }

    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    @Override
    public void invoke(Event event) {
        boolean firstLogin = this.userService.qryFirstLogin();
        LOGGER.info("首次登录校验:{}", firstLogin);
    }
}
